package test09_26;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        File file = new File("./demo1.2.3.4.txt");
        long len = file.length();
        System.out.println(len+"个字节");

        String name = file.getName();
        System.out.println("名字"+name);

        boolean cr = file.canRead();

        boolean cw = file.canWrite();

        System.out.println("可读："+cr);
        System.out.println("可写："+cw);

        boolean ih = file.isHidden();
        System.out.println("是否隐藏："+ih);
    }
}
